type F3 = () => string 
type F4 = () => string

let f3: F3 = () => 'hello'
let f4: F4
// 函数兼容性：函数的返回值类型是兼容的，因此两者可以相互赋值
f4 = f3
f3 = f4

type F5 = () => { name: string }
type F6 = () => { name:string, age: number }
let f5: F5
let f6: F6 = () => ({ name: 'hello', age: 18 })
// 函数兼容性：函数的返回值类型为对象时，对象属性多的可以赋值给对象属性少的
// f6 = f5
f5 = f6